Skip to content

Recognize test classes that inherit from a custom base class - #324

Merged
hyzyla merged 1 commit into
mainfrom
custom-test-base-classes
Aug 16, 2026
Merged

Recognize test classes that inherit from a custom base class#324
hyzyla merged 1 commit into
mainfrom
custom-test-base-classes

Conversation

@hyzyla

@hyzyla hyzyla commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes #323. Test discovery matched class X: XCTestCase { literally, so classes inheriting from a shared base never appeared in the Testing panel; it now reads the first type in the inheritance clause and accepts any name listed in the new sweetpad.testing.baseClasses setting. Matching stays textual, so a longer chain needs every level listed, and inherited test methods and Swift Testing remain out of scope.

Test discovery matched `class X: XCTestCase {` literally, so a class inheriting
from a shared base never reached the Testing panel. The scanner now reads the
first type in the inheritance clause and accepts any name from the new
`sweetpad.testing.baseClasses` setting, which also lets it tolerate protocol
conformances, generics and clauses wrapped across lines.
@hyzyla
hyzyla merged commit 84251f5 into main Aug 16, 2026
1 check passed
@hyzyla
hyzyla deleted the custom-test-base-classes branch August 16, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sweetpad-vscode: Support subclasses of XCTestCase in TestingManager (manager.ts)

1 participant